<script type="text"/javascript">
	$("input[name=submitStep2]").click(function() {
		var name = $("input[name=name]").val(); var username = $("input[name=username]").val(); var pass = $("input[name=password]").val(); var domain = $("input[name=domain]").val();
		var host = "<?php echo $_POST['host']; ?>"; var dbuser = "<?php echo $_POST['dbUser']; ?>"; var dbpass = "<?php echo $_POST['dbPass']; ?>"; var dbname = "<?php echo $_POST['dbname']; ?>";
		$("#step3").load("step3.php", { name: name: username: username, password: pass, domain: domain, host: host, dbuser: dbuser, dbpass: dbpass, dbname: dbname });
	});
</script>
<style type="text/css">
td {
	width: 50%;
}
</style>
<div class="wrap">
<h2>Step 2</h2>
<?php
function makePin($lenth =5) { 
    // makes a random alpha numeric string of a given lenth 
    $aZ09 = array_merge(range('A', 'Z'), range('a', 'z'),range(0, 9)); 
    $out =''; 
    for($c=0;$c < $lenth;$c++) { 
       $out .= $aZ09[mt_rand(0,count($aZ09)-1)]; 
    } 
    return $out; 
} 
?>
<p>Service Information. Here you can choose things such as username and password, and service name. Also the location where 3txt is located. If it is http://yourdomain.com, leave it as it is, if it it is located at something like http://yourdomain.com/3txt/, add the /3txt, make sure there is no "/" at the end though.</p>
<table>
<tr><td>Name</td><td><input type="text" name="name" value="3txt" /></td></tr>
<tr><td>Username</td><td><input type="text" name="username" value="admin" /></td></tr>
<tr><td>Password</td><td><input type="text" name="password" value="<?php echo makePin(); ?>" /></td></tr>
<tr><td>Location</td><td><input type="text" name="domain" value="http://<?php echo $_SERVER['SERVER_NAME']; ?>" /></td></tr>
<tr><td></td><td><input type="submit" name="submitStep2" value="Go!" /></td></tr>
</table>
</div>
<div id="step3"></div>